-- GENERATED SPELL FOR [Overseer Maltorius] --


function spell0_14621(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14621', 9500, 1)
end

function spell1_14621(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(11974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14621', 30276, 1)
end

function spell2_14621(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14621', 3000, 1)
end

function spell3_14621(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14621', 18000, 1)
end

function Sorts_14621(pUnit, Event)
local choix_sorts_14621 = math.random(0, 3)
if choix_sorts_14621 == 0 then
pUnit:RegisterEvent('spell0_14621', 1, 1)
end
if choix_sorts_14621 == 1 then
pUnit:RegisterEvent('spell1_14621', 1, 1)
end
if choix_sorts_14621 == 2 then
pUnit:RegisterEvent('spell2_14621', 1, 1)
end
if choix_sorts_14621 == 3 then
pUnit:RegisterEvent('spell3_14621', 1, 1)
end
end

function mob14621_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14621', math.random(1500, 3000), 1)
end

function mob14621_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14621_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14621_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14621, 1, 'mob14621_Action')
RegisterUnitEvent(14621, 2, 'mob14621_Leave')
RegisterUnitEvent(14621, 3, 'mob14621_Kill')
RegisterUnitEvent(14621, 4, 'mob14621_Die')
